from manim import *

class test(Scene):
    def construct(self):
        # dot = Dot([-2, -1, 0])
        # dot2 = Dot([2, 1, 0])
        # # 画一条线段，长度为a，宽度为0.2，颜色为红色
        # line = Line([-2, -1, 0], [-2, -1, 0]).set_color(ORANGE)
        # self.add(dot, dot2, line)

        line = Line(start=ORIGIN, end=2*RIGHT).set_color(ORANGE)
        self.play(Create(line))

# dot = Dot([-2, -1, 0])
# dot2 = Dot([2, 1, 0])
# line = Line(dot.get_center(), dot2.get_center())
# p1=dot.get_center()
# p2=dot2.get_center()
# print(p1,p2)